import request from '@/utils/request'
// 获取客户列表
export function getClientList(params) {
  return request({
    url: '/clients',
    params
  })
}
// 获取客户列表总数
export function allClientList(params) {
  return request({
    url: '/clients/count',
    params
  })
}
// 新增客户
export function addClient(data) {
  return request({
    url: '/clients',
    method: 'post',
    data
  })
}
// 编辑客户
export function putClients(id) {
  return request({
    url: '/clients/' + id,
    method: 'put'
  })
}
// 编辑客户
export function delClients(id) {
  return request({
    url: '/clients/' + id,
    method: 'delete'
  })
}
// 编辑客户
export function putClient(data) {
  return request({
    url: '/clients/' + data.id,
    method: 'put',
    data
  })
}
